---
title: Shopping Partner
---
The Shopping Partner agent is an AI-powered product recommendation system that helps users find the perfect products based on their specific preferences and requirements. This agent specializes in:

- **Smart Product Matching**: Analyzes user preferences and finds products that best match their criteria, ensuring a minimum 50% match rate
- **Trusted Sources**: Searches only authentic e-commerce platforms like Amazon, Flipkart, Myntra, Meesho, Google Shopping, Nike, and other reputable websites
- **Real-time Availability**: Verifies that recommended products are in stock and available for purchase
- **Quality Assurance**: Avoids counterfeit or unverified products to ensure user safety
- **Detailed Information**: Provides comprehensive product details including price, brand, features, and key attributes
- **User-Friendly Formatting**: Presents recommendations in a clear, organized manner for easy understanding

This agent is particularly useful for:
- Finding specific products within budget constraints
- Discovering alternatives when preferred items are unavailable
- Getting personalized recommendations based on multiple criteria
- Ensuring purchases from trusted, legitimate sources
- Saving time in product research and comparison

## Code

```python cookbook/examples/agents/shopping_partner.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.exa import ExaTools

agent = Agent(
    name="shopping partner",
    model=OpenAIChat(id="gpt-5-mini"),
    instructions=[
        "You are a product recommender agent specializing in finding products that match user preferences.",
        "Prioritize finding products that satisfy as many user requirements as possible, but ensure a minimum match of 50%.",
        "Search for products only from authentic and trusted e-commerce websites such as Amazon, Flipkart, Myntra, Meesho, Google Shopping, Nike, and other reputable platforms.",
        "Verify that each product recommendation is in stock and available for purchase.",
        "Avoid suggesting counterfeit or unverified products.",
        "Clearly mention the key attributes of each product (e.g., price, brand, features) in the response.",
        "Format the recommendations neatly and ensure clarity for ease of user understanding.",
    ],
    tools=[ExaTools()],
)
agent.print_response(
    "I am looking for running shoes with the following preferences: Color: Black Purpose: Comfortable for long-distance running Budget: Under Rs. 10,000"
)

```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set your API key">
    ```bash
    export OPENAI_API_KEY=xxx
    export EXA_API_KEY=xxx
    ```
  </Step>

  <Step title="Install libraries">
    ```bash
    pip install -U agno openai exa_py
    ```
  </Step>

  <Step title="Run Agent">
    <CodeGroup>
    ```bash Mac
    python cookbook/examples/agents/shopping_partner.py
    ```

    ```bash Windows
    python cookbook/examples/agents/shopping_partner.py
    ```
    </CodeGroup>
  </Step>
</Steps>
